<?php
/**
 * Created by PhpStorm.
 * User: LiuJiaJun
 * Date: 2018/2/17
 * Time: 12:18
 */
return array(
    //日志配置
    'defaultLogConfig'=>array(
        'appenders'=>array(
            'input'=>array(
                'class'=>'LoggerAppenderDailyFile',
                'layout'=>array(
                    'class' => 'LoggerLayoutPattern',
                    'params'=>array(
                        'conversionPattern'=>'%date{Y-m-d H:i:s.u} %logger %level %class(%line) %message%newline'
                    )
                ),
                'params'=>array(
                    'file'=>CMF_ROOT .'logs/api/input/'.date('Y-m').'/log_%s.txt',
                    'datePattern'=>'Y-m-d'
                )
            ),
            'machine'=>array(
                'class'=>'LoggerAppenderDailyFile',
                'layout'=>array(
                    'class' => 'LoggerLayoutPattern',
                    'params'=>array(
                        'conversionPattern'=>'%date{Y-m-d H:i:s.u} %logger %level %class(%line) %message%newline'
                    )
                ),
                'params'=>array(
                    'file'=>CMF_ROOT .'logs/api/machine/'.date('Y-m').'/log_%s.txt',
                    'datePattern'=>'Y-m-d'
                )
            ),
            'feed'=>array(
                'class'=>'LoggerAppenderDailyFile',
                'layout'=>array(
                    'class' => 'LoggerLayoutPattern',
                    'params'=>array(
                        'conversionPattern'=>'%date{Y-m-d H:i:s.u} %logger %level %class(%line) %message%newline'
                    )
                ),
                'params'=>array(
                    'file'=>CMF_ROOT .'logs/api/feed/'.date('Y-m').'/log_%s.txt',
                    'datePattern'=>'Y-m-d'
                )
            ),
            'return'=>array(
                'class'=>'LoggerAppenderDailyFile',
                'layout'=>array(
                    'class' => 'LoggerLayoutPattern',
                    'params'=>array(
                        'conversionPattern'=>'%date{Y-m-d H:i:s.u} %logger %level %class(%line) %message%newline'
                    )
                ),
                'params'=>array(
                    'file'=>CMF_ROOT .'logs/api/return/'.date('Y-m').'/log_%s.txt',
                    'datePattern'=>'Y-m-d'
                )
            ),
			 'output'=>array(
                'class'=>'LoggerAppenderDailyFile',
                'layout'=>array(
                    'class' => 'LoggerLayoutPattern',
                    'params'=>array(
                        'conversionPattern'=>'%date{Y-m-d H:i:s.u} %logger %level %class(%line) %message%newline'
                    )
                ),
                'params'=>array(
                    'file'=>CMF_ROOT .'/logs/api/output/'.date('Y-m').'/log_%s.txt',
                    'datePattern'=>'Y-m-d'
                )
            ),
            'inventory'=>array(
                'class'=>'LoggerAppenderDailyFile',
                'layout'=>array(
                    'class' => 'LoggerLayoutPattern',
                    'params'=>array(
                        'conversionPattern'=>'%date{Y-m-d H:i:s.u} %logger %level %class(%line) %message%newline'
                    )
                ),
                'params'=>array(
                    'file'=>CMF_ROOT .'logs/api/inventory/'.date('Y-m').'/log_%s.txt',
                    'datePattern'=>'Y-m-d'
                )
            ),
            'client'=>array(
                'class'=>'LoggerAppenderDailyFile',
                'layout'=>array(
                    'class' => 'LoggerLayoutPattern',
                    'params'=>array(
                        'conversionPattern'=>'%date{Y-m-d H:i:s.u} %logger %level %class(%line) %message%newline'
                    )
                ),
                'params'=>array(
                    'file'=>CMF_ROOT .'logs/api/client/'.date('Y-m').'/log_%s.txt',
                    'datePattern'=>'Y-m-d'
                )
            ),
            'car'=>array(
                'class'=>'LoggerAppenderDailyFile',
                'layout'=>array(
                    'class' => 'LoggerLayoutPattern',
                    'params'=>array(
                        'conversionPattern'=>'%date{Y-m-d H:i:s.u} %logger %level %class(%line) %message%newline'
                    )
                ),
                'params'=>array(
                    'file'=>CMF_ROOT .'logs/api/car/'.date('Y-m').'/log_%s.txt',
                    'datePattern'=>'Y-m-d'
                )
            ),
            'socket'=>[
                'class'=>'LoggerAppenderDailyFile',
                'layout'=>[
                    'class'=>'LoggerLayoutPattern',
                    'params'=>[
                        'conversionPattern'=>'%date{Y-m-d H:i:s.u} %logger %level %class(%line) %message%newline'
                    ]
                ],
                'params'=>[
                    'file'=>CMF_ROOT .'logs/api/socket/'.date('Y-m').'/log_%s.txt',
                    'datePattern'=>'Y-m-d'
                ]
            ],
            'app'=>[
                'class'=>'LoggerAppenderDailyFile',
                'layout'=>[
                    'class'=>'LoggerLayoutPattern',
                    'params'=>[
                        'conversionPattern'=>'%date{Y-m-d H:i:s.u} %logger %level %class(%line) %message%newline'
                    ]
                ],
                'params'=>[
                    'file'=>CMF_ROOT .'logs/app/app/'.date('Y-m').'/log_%s.txt',
                    'datePattern'=>'Y-m-d'
                ]
            ],
            'error'=>[
                'class'=>'LoggerAppenderDailyFile',
                'layout'=>[
                    'class'=>'LoggerLayoutPattern',
                    'params'=>[
                        'conversionPattern'=>'%date{Y-m-d H:i:s.u} %logger %level %class(%line) %message%newline'
                    ]
                ],
                'params'=>[
                    'file'=>CMF_ROOT .'logs/error/error/'.date('Y-m').'/log_%s.txt',
                    'datePattern'=>'Y-m-d'
                ]
            ],
            'exception'=>[
                'class'=>'LoggerAppenderDailyFile',
                'layout'=>[
                    'class'=>'LoggerLayoutPattern',
                    'params'=>[
                        'conversionPattern'=>'%date{Y-m-d H:i:s.u} %logger %level %class(%line) %message%newline'
                    ]
                ],
                'params'=>[
                    'file'=>CMF_ROOT .'logs/exception/exception/'.date('Y-m').'/log_%s.txt',
                    'datePattern'=>'Y-m-d'
                ]
            ]
        ),
        'rootLogger'=>[
//            'level'=>'error',
//            'appenders'=>['error'],
        ],
        'loggers' => [
            'input' => ['appenders' => ['input']],
            'output' => ['appenders' => ['output']],
            'inventory' => ['appenders' => ['inventory']],
            'client' => [
                'appenders' => ['client'],
                'additivity'=> false,
            ],
            'machine' => ['appenders' =>['machine']],
            'feed' => ['appenders' =>['feed']],
            'return' => ['appenders' =>['return']],
            'car' => ['appenders' => ['car']],
            'error' => ['appenders' => ['error']],
            'exception' => ['appenders' => ['exception']],
            'socket' => ['appenders' => ['socket']],
            'app' => ['appenders' => ['app']],
        ],
    )
);